---
title: Install DevSpace CLI
sidebar_label: 1. Install CLI
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
  defaultValue="npm"
  values={[
    { label: 'npm', value: 'npm', },
    { label: 'yarn', value: 'yarn', },
    { label: 'Mac Terminal', value: 'mac', },
    { label: 'Linux Bash', value: 'linux', },
    { label: 'Windows Powershell', value: 'windows', },
  ]
}>
<TabItem value="npm">

```bash
npm install -g devspace
```

</TabItem>
<TabItem value="yarn">

```bash
yarn global add devspace
```

</TabItem>
<TabItem value="mac">

```bash
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-darwin-amd64" && sudo install -c -m 0755 devspace /usr/local/bin
```

</TabItem>
<TabItem value="linux">

```bash
curl -L -o devspace "https://github.com/loft-sh/devspace/releases/latest/download/devspace-linux-amd64" && sudo install -c -m 0755 devspace /usr/local/bin
```

</TabItem>
<TabItem value="windows">

```powershell {4}
md -Force "$Env:APPDATA\loft"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://github.com/loft-sh/devspace/releases/latest/download/devspace-windows-amd64.exe" -o $Env:APPDATA\loft\devspace.exe;
$env:Path += ";" + $Env:APPDATA + "\loft";
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
```

:::info Check Environment Variable $PATH
Line 4 of this install script adds the install directory `%APPDATA%\devspace` to the `$PATH` environment variable. This is only effective for the current powershell session, i.e. when opening a new terminal window, `devspace` may not be found.

**Make sure to add the folder `%APPDATA%\devspace` to the `PATH` environment variable after installing DevSpace via Powershell. Afterwards, a reboot might be necessary.**

To confirm that DevSpace is successfully installed, reboot and test via:
```bash
devspace --version
```
:::

</TabItem>
</Tabs>

Alternatively, you can simply download the binary for your platform from the [GitHub Releases](https://github.com/loft-sh/devspace/releases) page and add this binary to your PATH.
